#ifndef _WINDOW_H_
#define _WINDOW_H_

#include <sstream>
#include <vector>
#include <cassert>

#include "SDL.h"
#include <GL/glew.h>

#include "wstr.h"
#include "compat.h"
#include "exception.h"

namespace window {

struct WindowError : util::Exception {
	WindowError(std::wstring msg) : util::Exception(msg) {}
};

// Returns a string containing information about the video system,
// for debugging purposes.
std::wstring getVideoInfo();

struct Resolution {
	uint32 w;
	uint32 h;
	uint32 bpp;
};
// Returns a list of supported resolutions
std::vector<Resolution> &listVideoModes();

// Open window
void openWindow(int width, int height, int bpp, bool fullscreen);


// Screen info
struct WindowInfo {
	int width;
	int height;
	uint32 bpp;
	bool fullscreen;
	float aspect;
	uint32 flags;
	SDL_Surface *surface;
};
static WindowInfo info;

}

#endif
